<style>
.vaptcha-container {width: 100%; height: 36px; line-height: 36px; text-align: center; }
.vaptcha-init-main {display: table; width: 100%; height: 100%; background-color: #EEEEEE; }
.vaptcha-init-loading {display: table-cell; vertical-align: middle; text-align: center }
.vaptcha-init-loading>a {display: inline-block; width: 18px; height: 18px; border: none; }
.vaptcha-init-loading>a img {width: auto !important;vertical-align: middle;height: auto !important;}
.vaptcha-init-loading .vaptcha-text {font-family: sans-serif; font-size: 12px; color: #bbb; vertical-align: middle }
</style>
<script src="https://v-cn.vaptcha.com/v3.js"></script>
<script>
$(document).ready(function() {
    $(".verify-box").html('<input type="hidden" name="verify" class="form-control" /><div class="layui-input-inline input-item"><div class="vaptcha-container" id="vaptchaContainer"><div class="vaptcha-init-main"><div class="vaptcha-init-loading"><a href="/" target="_blank"><img src="https://cdn.vaptcha.com/vaptcha-loading.gif" /></a><span class="vaptcha-text">Vaptcha启动中...</span></div></div></div></div>');
    vaptcha({
        vid: '{$config.appvid}', //验证单元id
        mode: 'click', //显示类型 点击式
        container: '#vaptchaContainer',
        scene: 1, //场景值 不填默认为0
        area: 'auto' //验证节点区域,默认 auto,可选值 auto,sea,na,cn
    }).then(function(obj) {
        obj.renderTokenInput('.layui-form');
        obj.render();
        $('input[name="verify"]').val('ok');
        $('.layui-form').on("error.form", function (e, data) {
            obj.reset();
        });
    })
})
</script>